
if __name__ == '__main__':
    print(12);

    #列表，类似Java中的数组,但是实际对应的实际Java中的集合
    names = ["高河强","和丽叶","高数森"];
    print(names);
    names.append("高婉琪")
    print(len(names));

    # for name in names:
    #     print(name);

    count =  len(names);
    while count > 0 :
        print(names[count -1]);
        count -= 1;

    print("====倒序====")

    names.reverse();
    print(names);
    names.insert(2,"ssew");
    print(names)
    names.pop(2);
    print(names)

    #元组的学习

    my_tuple = (223,"高河强",3422.11);

    for v in my_tuple:
        print(v);

    t_p = len(my_tuple);
    while t_p > 0:
        t_p -= 1;
        print(my_tuple[t_p]);


    info_tuple = ("小明",180.00,180);
    print("大家好我叫 %s,我身高 %.2f厘米,体重是%d斤" %info_tuple);


    info_list = list(info_tuple);
    print(info_list);

    info_tuple = tuple(info_list);
    print(info_tuple);

    #字典的学习
    print("======开始复习字典=========");
    zidian = {"name":"高河强","age":34,"salary":22000};
    print(zidian["name"]);
    #获取key的值
    if zidian.get("name1") == None:
        print("name1对应的value不存在")
    #添加字典的内容
    zidian["address"] = "河北邯郸曲周县";
    print(zidian);
    #删除key
    zidian.pop("address");
    #修改key的内容
    zidian["age"] = 19;
    print(zidian);
    #获取字典的长度
    print(len(zidian));

    zidian.clear();
    print(len(zidian))
    a = b = "python";
    print(a == b);
    print(a is b); #is比较的是内存地址


    a = "   ";
    print(len(a)); #是3
    print(a.isspace());

    s_str = "2223e3";
    m_d_str = "222";
    print(m_d_str.join(s_str));
    print(s_str[4]);

    print(s_str.isdecimal());
    print(m_d_str.isalnum())

    if m_d_str.isalnum():
        print(int(m_d_str));

    if m_d_str.islower():
        print(m_d_str);


    for i in (12,12,34,24):
        print(i);

    else:
        print("执行完了,但是没有找到我们要的东西！");


    students = [
        {"name":"阿土"},
        {"name": "小美"}

    ]

    find_name = "小美1";
    for obj in students:
        if obj["name"] == find_name:
            print("找到了 %s",obj["name"]);
            break;

    else:
        print("找不到我们想用的学生信息");
























